package com.hieuzest.citsaw.beam;

import com.hieuzest.citsaw.AndroidApplication;

/**
 * Created by Giraffe on 2017/11/25.
 */

public class RequestBody {
    int uid;
    int jid;
    double x;
    double y;
    int op;
    int pid;

    public static RequestBody generate() {
        return new RequestBody(){{
            uid = AndroidApplication.getInstance().CurrentUID;
            x = AndroidApplication.getInstance().CurrentX;
            y = AndroidApplication.getInstance().CurrentY;
            jid = 0;
        }};
    }

    public static RequestBody generateMark(int p) {
        return new RequestBody(){{
            uid = AndroidApplication.getInstance().CurrentUID;
            x = AndroidApplication.getInstance().CurrentX;
            y = AndroidApplication.getInstance().CurrentY;
            jid = 0;
            pid = p;
            op = 2;
        }};
    }

    public static RequestBody generateCatch(int p) {
        return new RequestBody(){{
            uid = AndroidApplication.getInstance().CurrentUID;
            x = AndroidApplication.getInstance().CurrentX;
            y = AndroidApplication.getInstance().CurrentY;
            jid = 0;
            pid = p;
            op = 1;
        }};
    }
}
